﻿<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<fmt:message key="SupplyInfo_name" var="SupplyInfo_name"/>
<fmt:message key="SupplyCatalogy_name" var="SupplyCatalogy_name"/>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<link rel="StyleSheet" href="../../scripts/dtree/dtree.css" type="text/css" />
<script type="text/javascript" src="../../scripts/dtree/dtree.js"></script>
<br>

<TABLE class=leftColumnModuleHead cellSpacing=0 cellPadding=0 
  width="100%" border=0 valign="top">
  <TBODY>
  <TR>
    <TH class="menu_title_left" width=48>&nbsp;</TH>
    <TH class="menu_title_middle">${SupplyInfo_name}${SupplyCatalogy_name}</TH>
    <th width="48" align="right" class="menu_title_right"></th>
   </TR>  
  </TBODY>
</TABLE>

<TABLE class=subMenu cellSpacing=0 cellPadding=0 width="100%" >
<c:forEach var="warehouse" items="${warehouses}">
	<c:if test="${warehouse.id != openWH}">
	<tr><td><a href="<c:url value="/modules/supply/supply.do?method=index&warehouseId=${warehouse.id}" />"><img src="../../themes/${sessionScope.loginUser.theme}/images/tree/base.gif" width="16" height="18" align="absmiddle" border="0"/>${warehouse.name}</a></td></tr>
	</c:if>
	<c:if test="${warehouse.id == openWH}">
	<tr>
	<td >
	<div class="dtree">

	<script type="text/javascript">
	 <!--
		d = new dTree('d');	
		d.add(0,-1,'<ff:out value="${warehouse.name}"/>');
		//d.selected = ${empty param.catalogyId?0:param.catalogyId};
		<c:forEach var="catalogy" items="${catalogys}">
		<%-- xiaofei_zhang 2011-01-12 PT043489 〖办公用品〗，用品分类列表上方的查询状态栏，增加查询条件“库房”，下拉选项为该用户有权使用的库房
		屏蔽下面 的  <c:if test="${catalogy.isleaf == 1}"><c:url value="/modules/supply/supplyInfos.do?method=list&catalogyId=${catalogy.id}&warehouseId=${catalogy.warehouse.id}"/></c:if>
		的条件 <c:if test="${catalogy.isleaf == 1}"> </c:if>  start
		 --%>
			d.add('${catalogy.id}','${catalogy.pid}','<ff:out value="${catalogy.name}"/>','<c:url value="/modules/supply/supplyInfos.do?method=list&catalogyId=${catalogy.id}&warehouseId=${catalogy.warehouse.id}"/>','<ff:out value="${catalogy.name}"/>');	
		</c:forEach>
		document.write(d);
		d.openTo(${empty param.catalogyId?0:param.catalogyId},true)
      //-->
	</script>
	</div>	
	</td>
	</tr>
	</c:if>
</c:forEach>
</TABLE>
